博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在一个页面加载另一个渲染的页面
阅读量:6938 次
发布时间:2019-06-27

本文共 2374 字,大约阅读时间需要 7 分钟。

 
     
     
       
           
       
     
 

@RequestMapping(value = "similarProduct.json", method = RequestMethod.POST) public String getSimilarProduct(HttpServletRequest request,                                 ModelMap model,                                 @RequestParam(value = "maxResult") int maxResult,                                 @RequestParam(value = "pageNo") int pageNo,                                 @RequestParam(value = "productId", defaultValue = "0") long productId,                                 HttpSession session) {
   Locale currentLocale = getRequestLanguage(session, request);    ProductJsons productJsons = null;    productJsons = extendProductService.moreLikeTag(productId, maxResult, currentLocale.toString());    if (productJsons != null) {
       if (productJsons.getProductJsonList() != null) {
           ArrayList
ids = new ArrayList<>();            for (ProductJson productJson : productJsons.getProductJsonList()) {
               ids.add(productJson.getId());            }            model.addAttribute("ratingMap", getAverageRatingById(ids));            model.addAttribute("checkWish", checkWishById(ids));            model.addAttribute("productJsons", productJsons);        }    }    return "moreLikeThis"; }

moreLikeThis.jsp

<%@ page language="java" pageEncoding="UTF-8" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 
 
 
     
       
     
 
本文转自wiwi博客51CTO博客,原文链接http://blog.51cto.com/wiwili/1968589如需转载请自行联系原作者
wiwili
你可能感兴趣的文章
此文是2013年应届生实习时,集中培训班的最后,个人写给大家的话
查看>>
BYOD大势所趋 但仍有挑战
查看>>
JVM致命错误日志(hs_err_pid.log)解读
查看>>
需要具备的技能
查看>>
一个老司机工程师整理的自动化测试资料
查看>>
单机环境搭建Postgres-XC开发测试环境
查看>>
三: 推荐系统
查看>>
PHP文件上传-单文件上传函数
查看>>
jvmtop 监控
查看>>
使用JMH进行并发测试
查看>>
关于服务器 SAN 和 SDS
查看>>
ASP.NET 如何做出简单的验证码
查看>>
我的友情链接
查看>>
Spring 转换 model 为 json 时增加属性
查看>>
最新在线软件测试模拟题,做完答案立显,自我检测好机会!
查看>>
论坛PC端模板
查看>>
域名解析
查看>>
通过SNMP获取接口速率 32位与64位的区别
查看>>
Windows上用gcc编译SQLite3
查看>>
bash位置参数的简介
查看>>